
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>

int main (int argc, char **argv)
{
	int fd;
	char buf[6];
	int len;

	fd = open("/dev/ap3216c", O_RDWR);
	if (fd == -1)
	{
		printf("can not open file /dev/ap3216c\n");
		return -1;
	}
	
	len = read(fd, buf, 6);
	printf("APP read: ");
	for (int i = 0; i < 6; i ++)
	{
		printf("%02x ", buf[i]);
	}
	printf("\n");

	close(fd);

	return 0;
}